package aip.project.controller.bio.Ricette;

import java.util.List;

import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;
import org.slim3.datastore.Datastore;

import aip.project.model.Prodotto;
import aip.project.model.Ricette;
import aip.project.service.RicetteService;

public class IndexController extends Controller {

    RicetteService service = new RicetteService();
    @Override
    public Navigation run() throws Exception {
            Ricette ricetta = service.getRicetta(Datastore.stringToKey(request.getParameter("key")));
            requestScope("ricetta",ricetta);
            requestScope("itemKey",Datastore.keyToString(ricetta.getKey()));
            requestScope("filterText",request.getParameter("filterText"));
            requestScope("filterKind",request.getParameter("filterKind"));
            return forward("index.jsp");
    
    }
}
